﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace Santa_sAdventure.View
{
    class SnowSystem
    {
        private SnowParticle[] particles;
        // Number of particles on screen
        private const int MAX_PARTICLES = 200;

        public SnowSystem()
        {
            particles = new SnowParticle[MAX_PARTICLES];

            for (int i = 0; i < MAX_PARTICLES; i++)
            {
                particles[i] = new SnowParticle(i);
            }
        }

        internal void Update(float elapsedTimeSeconds)
        {
            for (int i = 0; i < MAX_PARTICLES; i++)
            {
                particles[i].Update(elapsedTimeSeconds);
            }
        }

        internal void Draw(SpriteBatch a_spriteBatch, Camera a_camera, Texture2D a_snow)
        {
            for (int i = 0; i < MAX_PARTICLES; i++)
            {
                particles[i].Draw(a_spriteBatch, a_camera, a_snow);
            }
        }
    }
}
